//
//  WNBaseViewController.m
//  iOSOCProjectDirectory
//
//  Created by BHmac on 2017/6/8.
//  Copyright © 2017年 XieXuan. All rights reserved.
//

#import "WNBaseViewController.h"

@interface WNBaseViewController ()

@end

@implementation WNBaseViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    // 导航栏相关设置
    [self loadOrderNavigation];
    
}
//------------------------- 导航栏及界面基础设置 -----------------------------//

- (void)loadOrderNavigation{

    self.view.backgroundColor = [UIColor groupTableViewBackgroundColor];
    self.navigationController.navigationBar.translucent = NO;
    self.tabBarController.tabBar.translucent = NO;
    // 设置导航栏文字颜色大小
    [self.navigationController.navigationBar setTitleTextAttributes:@{NSForegroundColorAttributeName:[UIColor whiteColor],NSForegroundColorAttributeName:[UIFont systemFontOfSize:25]}];
    
}

//------------------------- 导航栏及界面基础设置 -----------------------------//

//------------------------- UITableView创建 -----------------------------//

- (void)initTableViewWithView:(UIView *)view frame:(CGRect)frame isGroup:(BOOL)isGroup{
        if (isGroup) {
            if (self.tableView) {
                [self.tableView removeFromSuperview];
            }
            self.tableView = [[BaesTableView alloc]initWithFrame:frame style:UITableViewStyleGrouped];
        }else{
            if (self.tableView) {
                [self.tableView removeFromSuperview];
            }
            self.tableView = [[BaesTableView alloc]initWithFrame:frame style:UITableViewStylePlain];
        }
        self.tableView.delegate = self;
        self.tableView.dataSource = self;
        [view addSubview:self.tableView];
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    
    return 0;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    static NSString *CellIdentifier = @"Cell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (!cell) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
    }
    return cell;
}

//------------------------- UITableView创建 -----------------------------//

@end
